package com.facebook.react.uimanager;

import com.facebook.react.bridge.ReactApplicationContext;
import com.facebook.react.uimanager.events.EventDispatcher;

import java.util.List;

/**
 * Created by chenwei on 2017/8/7.
 */
public class RNUIImplementation extends UIImplementation {

    public RNUIImplementation(ReactApplicationContext reactContext, List<ViewManager> viewManagers, EventDispatcher eventDispatcher, int minTimeLeftInFrameForNonBatchedOperationMs) {
        this(
                reactContext,
                new ViewManagerRegistry(viewManagers),
                new RNUIViewOperationQueue(reactContext,new NativeViewHierarchyManager(new ViewManagerRegistry(viewManagers)),minTimeLeftInFrameForNonBatchedOperationMs),
                eventDispatcher
        );
    }
    public RNUIImplementation(ReactApplicationContext reactContext, UIManagerModule.ViewManagerResolver viewManagerResolver, EventDispatcher eventDispatcher, int minTimeLeftInFrameForNonBatchedOperationMs) {
        this(
                reactContext,
                new ViewManagerRegistry(viewManagerResolver),
                new RNUIViewOperationQueue(reactContext,new NativeViewHierarchyManager(new ViewManagerRegistry(viewManagerResolver)),minTimeLeftInFrameForNonBatchedOperationMs),
                eventDispatcher
        );
    }
    public RNUIImplementation(ReactApplicationContext reactContext, ViewManagerRegistry viewManagers, UIViewOperationQueue operationsQueue, EventDispatcher eventDispatcher) {
        super(reactContext, viewManagers, operationsQueue,eventDispatcher);
    }
}
